package com.jingdun.sport.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jingdun.sport.bean.model.RoomUserSportRecordPerDay;
import com.jingdun.sport.dao.RoomUserSportRecordPerDayMapper;
import com.jingdun.sport.service.RoomUserSportRecordPerDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 活动室完成训练表 服务实现类
 * </p>
 *
 * @author powell
 * @since 2020-07-11
 */
@Service
public class RoomUserSportRecordPerDayServiceImpl extends ServiceImpl<RoomUserSportRecordPerDayMapper, RoomUserSportRecordPerDay> implements RoomUserSportRecordPerDayService {

    @Autowired
    private RoomUserSportRecordPerDayMapper roomUserSportRecordPerDayMapper;

    @Override
    public List<RoomUserSportRecordPerDay> getAllRoomMapUserByRoomId(Set<Long> ufinishedRoomIdSet) {
        return roomUserSportRecordPerDayMapper.getAllRoomMapUserByRoomId(ufinishedRoomIdSet);
    }

    @Override
    public List<RoomUserSportRecordPerDay> getAllRecordByRoomIdAndUserId(String roomId, String userId) {
        return roomUserSportRecordPerDayMapper.getAllRecordByRoomIdAndUserId(roomId, userId);
    }

    @Override
    public long getAllRecordByRoomIdAndUserIdAndDate(String userId, Long roomId, Date date) {
        return roomUserSportRecordPerDayMapper.getAllRecordByRoomIdAndUserIdAndDate(roomId, userId, date);
    }
}
